package com.dog.basics.security.service;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 用户详细信息
 *
 * @author
 */
@Getter
@Setter
public class DogSysUser extends User {
	/**
	 * 用户ID
	 */
	@Getter
	private Long userId;

	/**
	 *  账户类型 0 超管  1代理商  2场地方
	 */
	@Getter
	@Setter
	private Integer accountType;

	/**
	 * 账号类型 0 - 主  1-子账号
	 */
	@Getter
	private Integer accountLevel;
	/**
	 * 是否第一次登录 0 - 是  1-否
	 */
	@Getter
	private Integer sfFirst;

	public DogSysUser(Long userId,Integer sfFirst, String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
		super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
		this.userId = userId;
		this.sfFirst = sfFirst;
	}
}
